home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_pru_voicelineanotherway.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  86 lines

  1. # Jones 3D Cog Script
  2. #
  3. # PRU_voicelineAnotherWay.cog
  4. #
  5. # plays a line of dialogue as you enter a sector.  Modified to wait a moment
  6. # [SXC] [GGJ]
  7. #
  8. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  9. # ========================================================================================
  10.  
  11. symbols
  12.     message    entered
  13.     message    startup
  14.     
  15.     thing    actor                local
  16.     thing    player                local
  17.     int        bnosound=0               local
  18.     int        tracknum                local
  19.     flex        dialoguelength=3.0
  20.     sector    triggersector
  21.     sound        dialogue
  22.     template    tplActor=indy_sh_actor                    local
  23.     keyframe    armsCrossed=0in_stand2.key            local
  24.     keyframe    crossingArms=0in_stand1_bd_2.key    local
  25. end
  26.  
  27. # ========================================================================================
  28.  
  29. code
  30. startup:
  31.     bnosound=0;
  32.     player = GetLocalPlayerThing();
  33.     return;
  34.  
  35. # ........................................................................................
  36.  
  37. entered:
  38.     if (bnosound==0)
  39.     {
  40.         bnosound=1;
  41.         sleep(1.0);
  42.         StartCutscene(1);
  43.         
  44.         #Stop the player from moving and put him in a standing position
  45.         MakeMeStop();
  46.         DeselectWeaponWait(player);
  47.         Sleep(0.01);
  48.         
  49.         #Create an actor at the player's location and swap them out
  50.         actor = CreateThing(tplActor, player);
  51.         CaptureThing(actor);
  52.         
  53.         CopyPlayerHolsters(player, actor);
  54.         SetThingFlags(player, 0x80000);
  55.         SetActorFlags(player, 0x200000);
  56.         ClearThingFlags(actor, 0x80000);
  57.     
  58.         #Bring the camera around
  59.         SetExtCamLookOffset('0.0 0.04 0.014');
  60.         SetExtCamOffset('0.7 0.07 0.09');    #SetExtCamOffset('0.15 0.08 0.09');
  61.         
  62.         Sleep(0.25);
  63.         
  64.         #Indy crosses his arms, shakes his head, and says his line
  65.         trackNum = PlayKey(actor, armsCrossed, 2, 0x10, 0);
  66.         PlayVoice(actor, dialogue, 1, 0);
  67.         PlayKey(actor, crossingArms, 4, 0x12, 1);
  68.         StopKey(actor, trackNum, 0.5);
  69.         
  70.         #Move the player again so he's in the same spot as the actor, and swap them back
  71.         CopyOrientandPos(actor, player);
  72.         SetThingFlags(actor, 0x80000);
  73.         ClearThingFlags(player, 0x80000);
  74.         ClearActorFlags(player, 0x200000);
  75.         
  76.         RestoreExtCam();
  77.         EndCutscene();
  78.         
  79.         }
  80.     return;
  81.  
  82. end
  83.  
  84.  
  85.